<%@ page language="java" contentType="text/html; charset=UTF-8"
	pageEncoding="UTF-8"%>
<%@ taglib prefix="s" uri="/struts-tags"%>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
	<head>
		<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
		<link href="<s:url value="/css/style.css"/>" rel="stylesheet"
			type="text/css" />
		<script type="text/javascript" src="<s:url value="/js/jquery.js"/>"></script>
		<script type="text/javascript" src="<s:url value="/js/common.js"/>"></script>
		<script type='text/javascript'
			src="<s:url value="/js/autocomplete/jquery.bgiframe.min.js"/>"></script>
		<script type='text/javascript'
			src="<s:url value="/js/autocomplete/jquery.ajaxQueue.js"/>"></script>
		<script type='text/javascript'
			src="<s:url value="/js/autocomplete/thickbox-compressed.js"/>"></script>
		<script type='text/javascript'
			src="<s:url value="/js/autocomplete/jquery.autocomplete.js"/>"></script>
		<link rel="stylesheet" type="text/css"
			href="<s:url value="/js/autocomplete/jquery.autocomplete.css"/>" />
		<script type="text/javascript" src="<s:url value="/js/jquery-ui.js"/>"></script>
		<link rel="stylesheet" type="text/css"
			href="<s:url value="/js/autocomplete/thickbox.css"/>" />
		<link href="<s:url value="/css/jquery.css"/>" rel="stylesheet"
			type="text/css" />
		<script type="text/javascript">
	function doSubmit() {
		// here is validate form .
		$('#editForm').submit();
	};
	function goBack() {
		location.href = '<s:url value="/system/TodoEvent/list"/>';
	};
	$(document)
			.ready(
					function() {
						if ($.trim($('#result').text()) != '') {
							popupDiv('pop-div');
						}
						;
						$('#reminderStartTime').datepicker( {
							dateFormat :'yy-mm-dd'
						});
						$('#reminderEndTime').datepicker( {
							dateFormat :'yy-mm-dd'
						});
						$("div[id^='toObject']").hide();
						var tt = $(
								"input[name='toObject'][type='radio'][checked='checked']")
								.val();
						$("#toObject" + tt).show();
					});
	function doSelectToObject(event) {
		$("div[id^='toObject']").hide();
		$("#toObject" + event.value).show();
	};
</script>
		<title><s:text name="system.title" />
		</title>
	</head>
	<body>
		<s:include value="/common/up.jsp"></s:include>
		<table width="100%" border="0" cellspacing="0" cellpadding="0">
			<tr>
				<td class="box">
					<table width="100%" border="0" cellspacing="0" cellpadding="0">
						<tr>
							<td id="tag-over">
								<span id="tag-over">Event </span>
							</td>
							<td class="tab3-line" width="90%">
								&nbsp;
							</td>
						</tr>
					</table>
					<s:form action="TodoEvent/save" namespace="/system" method="post"
						id="editForm" name="editForm">
						<s:hidden name="id"></s:hidden>
						<table width="100%" border="0" cellpadding="3" cellspacing="1"
							class="margin">
							<tr>
								<td align="right" width="50%" class="tablecolour5">
									Create
								</td>
								<td width="50%" class="tablecolour5">
									<s:property value="createUser.name" />
									AT
									<s:date format="yyyy-MM-dd HH:mm" name="createTime" />
								</td>
							</tr>
							<tr>
								<td align="right" width="50%" class="tablecolour5">
									Title:
								</td>
								<td width="50%" class="tablecolour5">
									<s:property value="title" />
								</td>
							</tr>
							<tr>
								<td align="right" width="50%" class="tablecolour5">
									Type:
								</td>
								<td width="50%" class="tablecolour5">
									<s:radio name="todoType" listKey="name()" disabled="true"
										list="@com.ef.constant.EUserTodoType@values()" />
									<br>
									<div id="aaa">
										TO Somebody:
										<s:property value="getSelLeadsInfo()" />
										<s:hidden id="selstudentid" name="selLeadsId" />
									</div>
								</td>
							</tr>
							<tr>
								<td align="right" width="50%" class="tablecolour5">
									To:
								</td>
								<td width="50%" class="tablecolour5">
									<s:radio name="toObject" listKey="name()" disabled="true"
										list="@com.ef.constant.EUserTodoObject@values()" />
									<div id="toObjectUser" title="toObjectUser">
										TO User:
										<s:property value="toUser.name" />
										<s:hidden id="seluserid" name="toUserId" />
									</div>
									<div id="toObjectTeam" title="toObjectTeam">
										TO Team:
										<s:property value="toTeam.name" />
									</div>
									<div id="toObjectRole" title="toObjectRole">
										TO Role:
										<s:property value="toRole.name" />
									</div>
									<div id="toObjectDepartment" title="toObjectDepartment">
										TO Department:
										<s:property value="toDepartment.name" />
									</div>
								</td>
							</tr>
							<s:set name="finishType" value="getFinishType()" />
							<s:if test="#finishType != ''">
								<tr>
									<td align="right" width="50%" class="tablecolour5">
										<s:property value="#finishType" />
									</td>
									<td width="50%" class="tablecolour5">
										<s:property value="finishUser.name" />
										AT
										<s:date format="yyyy-MM-dd HH:mm" name="finishTime" />
									</td>
								</tr>
							</s:if>
							<tr>
								<td align="right" width="50%" class="tablecolour5">
									Valid Duration:
								</td>
								<td width="50%" class="tablecolour5">
									<s:date format="yyyy-MM-dd HH:mm" name="reminderStartTime" />
									To:
									<s:date format="yyyy-MM-dd HH:mm" name="reminderEndTime" />
								</td>
							</tr>
							<tr>
								<td align="right" width="50%" class="tablecolour5">
									Detail:
								</td>
								<td width="50%" class="tablecolour5">
									<s:textarea name="Detail" cols="80" rows="3" readonly="true" />
								</td>
							</tr>
							<tr>
								<td align="center" colspan="2" height="50" class="tablecolour5">
									<input name="goback" type="button" class="btn1" value="Go Back"
										onclick="goBack()" />
								</td>
							</tr>
						</table>
					</s:form>
				</td>
			</tr>
		</table>
		<s:include value="/common/down.jsp"></s:include>
		<div id='pop-div' style="width: 300px;" class="pop-box">
			<s:include value="/common/confirm.jsp"></s:include>
		</div>
	</body>
</html>